package com.newcapec.lesson4;

public class Demo2 {
    public static void main(String[] args) {

           // String str1 = "123";



     /*   String str2 = new String("123");
        str2 = "abc";
        str2 = str2+"111";*/
        System.out.println("------------------");
        String str1 = "hello";
        String str2 = " world!!!";

        String str3 = str1+str2;
        String str4 = "hello world!!!";
        String str5 = "hello"+" world!!!";
        String str6 = "hello"+str2;


        //System.out.println(str3.equals(str4));
        System.out.println(str3 == str4);
        System.out.println(str3 == str5);
       // System.out.println(str3 == str5);
        System.out.println(str4 == str5);
    }


}
